package ksv.cron;

import api.common.Global;
import api.common.util.DubboUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.TimeZone;

/**
 * @创建人 xiaojiancheng
 * @时间 2020/8/15
 * @描述 $k$
 */
@SpringBootApplication
@Slf4j
@EnableDubbo
@EnableDiscoveryClient
@MapperScan("mybatis.mapper")
public class CronMain {
    public static void main(String[] args) {
        DubboUtils.initDubboRegistryHost();
        System.setProperty("nacos.logging.default.config.enabled", "false");
        System.setProperty("swagger2.backage", "ksv");
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
        ConfigurableApplicationContext run = SpringApplication.run(CronMain.class, args);
        Global.addApplication(run);
    }
}
